import type { Plugin, App } from "vue";
import FormMain from "./FormMain.vue";
import FormSelect from "./FormSelect.vue";
import FormRadioGroup from "./FormRadioGroup.vue";
import FormTree from "./FormTree.vue";
import FormSearch from "./FormSearch.vue";
import FormVerifyImage from "./FormVerifyImage.vue";
import FormVerifyCode from "./FormVerifyCode.vue";
export * from "./types";
export * from "./utils";

export {
  FormMain,
  FormSelect,
  FormSearch,
  FormRadioGroup,
  FormTree,
  FormVerifyImage,
  FormVerifyCode,
};

const components = {
  FormMain,
  FormSelect,
  FormRadioGroup,
  FormTree,
  FormSearch,
  FormVerifyImage,
  FormVerifyCode,
};

export const formInstall: Plugin = {
  install(app: App) {
    Object.entries(components).forEach(([name, component]) => {
      app.component(name, component);
    });
  },
};
